<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.io.*,java.util.*,java.sql.*"%>
<%@ page import="javax.servlet.http.*,javax.servlet.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
 <%request.setCharacterEncoding("UTF-8");%> 
<!DOCTYPE html>
<html>
	<head>
	<%request.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");
%>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Insert title here</title>
	</head>
	<body>
	
	<sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver"
     url="jdbc:mysql://localhost:3306/gms?useUnicode=true&characterEncoding=utf-8"
     user="root"  password="123456"/>
 
<sql:query dataSource="${snapshot}" var="result">
SELECT * from recruitmentinformation;
</sql:query>
		<table border="1" width="50%">
			<thead>
				<tr>
					<th>公告标题</th>
					<th>公告内容</th>
					<th>时间</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
			
					<c:forEach items="${result.rows}" var="a">
					<tr>
						<td>${a.EnterpriseName }</td>
						<td>${a.Recruitment_position} </td>
				        <td>${a.wages} </td>
						<td>
							<a href="/GMS/RecruitmentInformationDelete?enterpriseid=${a.EnterpriseID }">删除</a>
							<a href="/GMS/RecruitmentInformationEdit?enterpriseid=${a.EnterpriseID }">编辑</a>
						</td>
					</tr>
					</c:forEach>
			
			
		</tbody>
		</table>
	</body>
</html>